package controllayer;

/**
 * The Class ObjectAlreadyExistsException.
 * @author
 */
public class ObjectAlreadyExistsException extends RuntimeException {

	/** The key. */
	private String key;

	/**
	 * Instantiates a new object already exists exception.
	 *
	 * @param key
	 *            the key
	 */
	public ObjectAlreadyExistsException(String key) {
		this.key = key;
	}

	/**
	 * Gets the key.
	 *
	 * @return the key
	 */
	public String getKey() {
		return key;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see java.lang.Throwable#toString()
	 */
	@Override
	public String toString() {
		return "Fejl: " + key;
	}
}